<?php
	/**
	 * @author Mikulas Dite, Peter Ped Helcmanovsky
	 */
?>

<style n:syntax="double">
td a {color: black !important;}
td.todo a {color: inherit !important;}
td.fixme a{color: rgb(255, 20, 20) !important;}
td.pending a {color: rgb(200, 0, 200) !important;}
</style>

<h1>{$todoCount}&times;TODO (in {=count($todos)} file{if count($todos) != 0}s{/if})</h1>

<div class="nette-inner">
	<table style="width: 100%;">
		<thead>
			<tr>
				<th>File</th>
				<th>Line</th>
				<th n:if="$showType">Type</th>
				<th>Todo</th>
			</tr>
		</thead>
		<tbody>
			{foreach $todos as $file => $t}
				{foreach $t as $line => $todo}
					<tr>
						<td n:if="$iterator->first" rowspan="{=count($t)}" title="{$file}">
							<a href="{$todo['link']}">{=$todo['file']}</a>
						</td>
						<td style="text-align: right; color: #777;">
							<a href="{$todo['link']}">{$todo['line']}</a>
						</td>
						<td n:if="$showType" style="color: #777;">
							{$todo['type']}
						</td>
						<td class="{$todo['type']}">
							<a href="{$todo['link']}">{$todo['content']}</a>
						</td>
					</tr>
				{/foreach}
			{/foreach}
		</tbody>
	</table>
</div>
